import request from '@/axios/request'
import url from '@/axios/url'
const { mesUrl, adminUrl, wmsUrl } = url()
// 导出url
export const exportUrl = `${mesUrl}mesProdOrder/export`



/**
 * 修改
 * @param data
 * @returns {*|Promise<*>}
 */
export function mesTmMaterialOrderQuantityConfirmation(data = '') {
  return request({
    url: `${mesUrl}mesTmMaterialOrder/quantityConfirmation`,
    method: 'post',
    data: data
  })
}
/**
 * 修改
 * @param data
 * @returns {*|Promise<*>}
 */
export function mesTmMaterialOrderQuantityConfirmationBatch(data = '') {
  return request({
    url: `${mesUrl}mesTmMaterialOrder/quantityConfirmationBatch`,
    method: 'post',
    data: data
  })
}
export function mesTmMaterialOrderQuantitySaveBatch(data = '') {
  return request({
    url: `${mesUrl}mesTmMaterialOrder/quantitySaveBatch`,
    method: 'post',
    data: data
  })
}
/**
 * 分页
 * @param data
 * @returns {*|Promise<*>}
 */
export function mesTmMaterialOrderPage(data = {}) {
  return request({
    url: `${mesUrl}mesTmMaterialOrder/page`,
    method: 'get',
    params: data
  })
}
export function mesTmMaterialOrderOutStockPage(data = {}) {
  return request({
    url: `${mesUrl}mesTmMaterialOrder/outStockPage`,
    method: 'get',
    params: data
  })
}
export function mesTmMaterialOrderPickingBatchPc(data = {}) {
  return request({
    url: `${mesUrl}mesTmMaterialOrder/pickingBatchPc`,
    method: 'post',
    data: data
  })
}
/**
 * 分页
 * @param data
 * @returns {*|Promise<*>}
 */
export function mesTmMaterialOrderOrderPage(data = {}) {
  return request({
    url: `${mesUrl}mesTmMaterialOrder/orderPage`,
    method: 'get',
    params: {
      ...data,
      orderStateList:"0,3,4,5,6,7,8"
    }
  })
}
/**
 * 不分页
 * @param data
 * @returns {*|Promise<*>}
 */
export function mesTmMaterialOrderList(data = {}) {
  return request({
    url: `${mesUrl}mesTmMaterialOrder/listWithBrand`,
    method: 'get',
    params: data
  })
}


export function mesTmMaterialOrderOutList(data = {}) {
  return request({
    url: `${mesUrl}mesTmMaterialOrder/list`,
    method: 'get',
    params: data
  })
}
